package com.huan.shiro.config;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.huan.shiro.dao.entity.User;
import com.huan.shiro.service.IUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author Huan
 */
@Service
public class ShiroData {
    @Resource
    private IUserService iUserService;

    String getPasswordByUsername(String username) {
        User user = iUserService.selectOne(new EntityWrapper<User>().eq("username", username));
        return user.getPassword();
    }
}
